/*
编写 : Hexh
时间 : 2012-11-27 14:38:41
*/
using System;
using System.Collections.Generic;
using FSBS.Core.Entity;
using FSBS.Core.Entity.IRespositories;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;

namespace FSBS.Facade.Impl
{
	/// <summary>
	///	 the impl of IFsbsQmTrlsFacade
	/// </summary>
	public class FsbsQmTrlsFacadeImpl : IFsbsQmTrlsFacade
	{

		private readonly IFsbsQmTrlsRepository FsbsQmTrlsRepository;

		public FsbsQmTrlsFacadeImpl(IFsbsQmTrlsRepository FsbsQmTrlsRepository)
        {
			this.FsbsQmTrlsRepository = FsbsQmTrlsRepository;
        }

        #region IFsbsQmTrls Entity Save,Get,Update,Delete

		public FsbsQmTrls Get(string id)
		{
			return FsbsQmTrlsRepository.Get(id);
		}

		public FsbsQmTrls Load(string id)
		{
			return FsbsQmTrlsRepository.Load(id);
		}

		public void SaveOrUpdate(FsbsQmTrls entity)
		{
			this.FsbsQmTrlsRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			FsbsQmTrlsRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			FsbsQmTrlsRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return FsbsQmTrlsRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return FsbsQmTrlsRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<FsbsQmTrls> GetAll()
		{
			return FsbsQmTrlsRepository.GetAll();
		}

		public IList<FsbsQmTrls> GetPlist(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
        {
			return FsbsQmTrlsRepository.GetPlist(query, start, limit, sort, dir, filters, out total);
        }
		
		#endregion
	}
}
